package Views;

import Source.DeleteFlight;
import UCM.UCDeleteFlight;
import java.awt.FlowLayout;
import javax.swing.JButton;
import javax.swing.JComboBox;
import javax.swing.JPanel;

/**
 *
 * @author Joshua King
 */
public class ViewDeleteFlight extends JPanel {
    private static String TEXT = "Error!111ewrc";
    private static String TEXT2 = "Success!LKJAS";
    private JComboBox newBox;
    private JButton deleteFlightBtn = new JButton();
    private DeleteFlight model;
    private UCDeleteFlight UCDeleteFlight = new UCDeleteFlight(this);
    
    public ViewDeleteFlight(String[] str) {
        setLayout(new FlowLayout());
        newBox = new JComboBox(str);
        add(newBox);
        add(deleteFlightBtn);
        deleteFlightBtn.addActionListener(new AdapterUCCToAL(UCDeleteFlight));
        validate();
    }
    
    public void loadData() {
        //model.newBox.getSelectedItem()
    }

    public void loadTo(DeleteFlight model) {
        this.model = model;
    }

    public void refresh() {      
        ViewMain.getInstance().updateMsg(TEXT2);
    }

    public void updateFailure() {
        ViewMain.getInstance().updateMsg(TEXT);
    }
    
}
